package com.sbc.convention.errorcode;

import lombok.AllArgsConstructor;

/**
 * @description: 基础错误码定义
 * @author: songbaicheng
 * @create: 2024-02-27 10:05
 **/
@AllArgsConstructor
public enum BaseErrorCodeEnum implements IErrorCode {
    /**
     * 一级宏观错误码
     */
    CLIENT_ERROR("A000001", "用户端错误"),
    SERVICE_ERROR("B000001", "后台服务异常"),
    REMOTE_ERROR("C000001", "调用第三方服务出错");

    /**
     * 错误码
     */
    private final String code;
    /**
     * 错误信息
     */
    private final String message;

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
